function getLen(s) {
	var l = 0;
	var a = s.split("");
	for (var i = 0; i < a.length; i++) {
		if (a[i].charCodeAt(0) < 299) {
			l++;
		} else {
			l += 2;
		}
	}
	return l;
}

function goBack() {
	history.go(-1);
}

function delConfirm() {
	var gnl = confirm("确认删除?");
	if (gnl == true) {
		return true;
	} else {
		return false;
	}
}

function get_scrollTop_of_body(){ 
    var scrollTop; 
    if(typeof window.pageYOffset != 'undefined'){
        scrollTop = window.pageYOffset; 
    }else if(typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat')        { 
        scrollTop = document.documentElement.scrollTop; 
    }else if(typeof document.body != 'undefined'){ 
        scrollTop = document.body.scrollTop; 
    } 
    return scrollTop; 
}

function getVerifyCode(imgId) {
	$("#" + imgId).attr("src", "/verifyCode" + '?' + new Date().getTime());
}

function loadErrorImg(path) {
	var img = event.srcElement;
	img.src = path;
	img.onerror = null;
}